<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <link rel="stylesheet" href="helpwin.css">
      <title>MATLAB File Help: lomb</title>
   </head>
   <body>
      <!--Single-page help-->
      <table border="0" cellspacing="0" width="100%">
         <tr class="subheader">
            <td class="headertitle">MATLAB File Help: lomb</td>
            <td class="subheader-left"><a href="lomb.m">View code for lomb</a></td>
            <td class="subheader-right"><a href="Contents.html">WFDB Contents</a></td>
         </tr>
      </table>
      <div class="title">lomb</div>
      <div class="helptext"><pre><!--helptext -->


function varargout=lomb(varargin)

 [Pxx,F]=lomb(x,dcOffset,smooth)

    Wrapper to WFDB LOMB:
         http://www.physionet.org/physiotools/wag/lomb-1.htm

 Transforms a real-valued time series 'x' into a power spectrum 'X', using a 
 technique known as the Lomb periodogram. The input is a Nx2 matrix containing 
 a sampled time series, presented as two columns of numbers (the sample times 
 in the first column and the sample values in the second). The intervals between 
 consecutive samples need not be uniform.  

Input Parameters:
 x    
       Nx2 vector of doubles. First column is sample time index (in
       seconds), and second column is the sample value of the signal at
       that time.

 dcOffset (Optional)
       Booelan. If present add constant to input samples ( x(:,2) ), such that the mean
       values of the time series is zero (default=1).

 smooth   (Optional)
       Boolean String specifying the if the output should be smoothed (default =1).
 

Output Parameters:

Pxx 
       Mx1 Double. Estimated power spectrum.

F 
       Mx1 Double. Frequency of the estimated power spectrum (Hz).


 CITING CREDIT: To credit this function, please cite the following paper at your work:

Moody, G.B.
    Spectral analysis of heart rate without resampling. Computers in Cardiology 1993, pp. 715-718 (IEEE Computer Society Press, 1993). http://www.physionet.org/physiotools/lomb/lomb.html . 


Additional References:
Lomb, N.R.
    Least-squares frequency analysis of unequally spaced data. Astrophysics and Space Science 39:447-462 (1976). 
Press, W.H, and Rybicki, G.B.
    Fast algorithm for spectral analysis of unevenly sampled data. Astrophysical J. 338:277-280 (1989). 
Press, W.H. Teukolsky, S.A., Vetterling, W.T., and Flannery, B.P.
    Numerical Recipes in C: the Art of Scientific Computing, pp. 575-584 (Cambridge Univ. Press, 1992). 
Moody, G.B.
    Spectral analysis of heart rate without resampling. Computers in Cardiology 1993, pp. 715-718 (IEEE Computer Society Press, 1993). http://www.physionet.org/physiotools/lomb/lomb.html . 



 MATLAB wrapper written by Ikaro Silva, 2013
 Last Modified: -
 Version 1.0
 Since 0.9.0 


 %Example: Heart Rate Spectral Analysis:
 [tm, signal]=rdsamp('mitdb/100',1);
 [ann]=rdann('mitdb/100','atr');
 [Pxx,F]=lomb([tm(ann) signal(ann)]);
 plot(F,Pxx);grid on;hold on

 See also RDANN, TACH, SQRS, WQRS
</pre></div><!--after help -->
   </body>
</html>
